#!/bin/bash
procId=`ps -ef | grep $1 |grep -v 'grep' | awk '{print $2}' | head -1`;
echo "runing  kill -15 " $name: " pid -> " $procId
kill -15 $procId
sleep 3s
procId2=`ps -ef | grep $1 |grep -v 'grep' | awk '{print $2}' | head -1`;

if [ "$procId2"x == ""x ] ; then
   echo "process kill done"
else
   echo "process kill fail $procId2"
fi  